/*
 * @Author: c
 * @Date: 2023-12-04 21:49:59
 * @LastEditTime: 2024-01-08 00:11:30
 * @LastEditors: c
 * @Description:
 * @FilePath: \vue3-element-admin\src\directive\index.ts
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import type { App } from "vue";

import { hasPerm } from "./permission";
import { draggable } from "./draggable";

// 全局注册 directive
export function setupDirective(app: App<Element>) {
  // 使 v-hasPerm 在所有组件中都可用
  app.directive("hasPerm", hasPerm);
  app.directive("draggable", draggable);
}
